package cn.stylefeng.guns.animals.modular.mouthform.controller;


import cn.stylefeng.guns.animals.modular.system.dao.MouthformMapper;
import cn.stylefeng.guns.animals.modular.system.model.Mouthform;

import cn.stylefeng.roses.core.base.controller.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import org.springframework.beans.factory.annotation.Autowired;


import cn.stylefeng.guns.animals.modular.mouthform.service.IMouthformService;

import java.util.List;

/**
 * mouthform控制器
 *
 * @author fengshuonan
 * @Date 2020-09-07 18:15:31
 */
@Controller
@RequestMapping("/mouthform")
public class MouthformController extends BaseController {

    private String PREFIX = "/mouthform/mouthform/";

    @Autowired
    private MouthformMapper mouthformMapper;

    @Autowired
    private IMouthformService mouthformService;

    /**
     * 跳转到mouthform首页
     */
    @RequestMapping("")
    public String index() {
        return PREFIX + "mouthform.html";
    }




    /**
     * 获取mouthform列表
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list() {
        List<Mouthform> getalertform = mouthformMapper.getalertform();
        return getalertform;
    }

    /**
     * 获取Yearform列表 var table = new BSTable(Yearform.id, "/mouthform/YearList", defaultColunms); 通过/mouthform/YearList配置获取数据
     */
    @RequestMapping(value = "/YearList")
    @ResponseBody
    public Object YearList() {
        List<Mouthform> getalertyearform = mouthformMapper.getalertyearform();
        return getalertyearform;
    }
    /*
    * 跳转到yearform报表
     */
    @RequestMapping("/SkipAnnual")
    public String SkipAnnual(){


        return PREFIX+"yearform.html";
    }





}
